module.exports = {
    title: 'BAP使用手册',
    description: 'Just playing around',
    dest: './dist',
    port: 8086,
    head: [
        ['link', {rel: 'icon', href: '/bridge/favicon.ico'}]
    ],
    markdown: {
        lineNumbers: true
    },
    plugins: {
        '@vuepress/active-header-links': {
            sidebarLinkSelector: '.sidebar-link',
            headerAnchorSelector: '.header-anchor'
        },
        '@vuepress/medium-zoom': {
            options: {
                margin: 24,
                background: 'rgba(30, 30, 30, .95)',
                scrollOffset: 0
            }
        }
    },
    themeConfig: {
        docsDir: 'docs',
        search: true,
        smoothScroll: true,
        editLinks: true,
        logo: '/bridge/logo.png',
        sidebarDepth: 2,
        nav: [
            {text: '首页', link: '/'},
            {text: 'BAP常见问题说明', link: '/guide/sqlse.html'},
            {text: 'BAP常用配置修改', link: '/bapConfigEdit/portModify.html'},
            {text: 'BAP接口调试的几种方式', link: '/bapInterface/'},
            {text: 'Swagger文档使用手册', link: '/swagger/'},
            {text: '本地开发工具导入业务模块步骤', link: '/localDev/'},
            {
                text: '开发实例', items: [
                    {
                        text: '微服务模块接口互相调用方法',
                        link: '/devSample/微服务模块接口互相调用方法.md'
                    },{
                        text: '业务模块配置项使用说明',
                        link: '/devSample/业务模块配置项使用说明.md'
                    },
                ]
            },
            {
                text: '实体配置开发说明', items: [
                    {
                        text: '第三方jar包上载下载说明',
                        link: '/entityDevSample/第三方jar包上载下载说明.md'
                    },{
                        text: '第三方jar包上载说明',
                        link: '/entityDevSample/第三方jar包上载说明.md'
                    },{
                        text: '业务模块白名单配置说明',
                        link: '/entityDevSample/业务模块白名单配置说明.md'
                    },{
                        text: '业务模块添加自定义配置项',
                        link: '/entityDevSample/业务模块添加自定义配置项.md'
                    },
                ]
            },
        ],
        locales: {
            '/': {
                label: '简体中文',
                selectText: '选择语言',
                ariaLabel: '选择语言',
                editLinkText: '在 GitHub 上编辑此页',
                lastUpdated: '上次更新',
                sidebar: {
                    '/guide/': getGuideSidebar('BAP常见问题说明'),
                    '/bapConfigEdit/': [{
                        title: 'BAP常用配置修改',
                        collapsable: false,
                        children: [
                            'portModify.md',
                            'muti-IP.md',
                            'IPModify.md',
                        ]
                    }],
                }
            },
        }
    }
};

function getGuideSidebar(groupA, groupB) {
    return [
        {
            title: groupA,
            collapsable: false,
            children: [
                'sqlse.md',
                'updateError.md',
                'startupError.md',
                'activeMQError.md',
                'consulError.md',
                'database.md',
                'debugger.md',
                'bapServer.md',
                'jdkVersion.md',
                'kafka.md',
                'model.md',
                'redis.md',
                'service.md',
                'zk.md',
                'swagger.md',
                'softwareDog.md',
                'oracle.md',
                'oracleDataBase.md',
                'bap5.md',
                'bap4.md',
                'linux.md',
                'bapForSearch.md',
                'bapForDebug.md',
                'ideaTest',
                'aaa.md'
            ]
        }
    ]
}
